package us.icitap.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class FormatingUtils {

	public static final String SHORT_DATE_FORMAT = "dd.MM.yyyy";
	public static final String DATE_TIME_FORMAT = "dd.MM.yyyy HH:mm";
	public static final String DATE_TIME_FORMAT_1 = "dd.MM.yyyy HH:mm:ss";
	public static final String TIME_FORMAT = "HH:mm";
    
    
    public static String formatedDate(Date date){
		SimpleDateFormat sdf = new SimpleDateFormat(SHORT_DATE_FORMAT);
		if(date != null) return sdf.format(date);
		return null;
	}
	
	public static String formatedDateTime(Date date){
		SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_FORMAT);
		if(date != null) return sdf.format(date);
		return null;
	}
	
	public static String formatedDateTime1(Date date){
		SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_FORMAT_1);
		if(date != null) return sdf.format(date);
		return null;
	}
	
	public static String formatedTime(Date date){
		SimpleDateFormat sdf = new SimpleDateFormat(TIME_FORMAT);
		if(date != null) return sdf.format(date);
		return null;
	}
	
	public static String yesNoConverter(boolean value){
		if(value) return "PO";
		else return "JO";
	}
	
	
	
}
